package com.example.medical.Mapper;


import com.example.medical.Bean.yonghu;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface yonghuMapper  {
    /**
     * 根据用户ID得到密码，密码为加密后的密码
     * @param userid
     * @return
     */
    @Select("select password from [yonghu] where userid=#{userid} ")
    yonghu getPasswordByUserid(@Param("userid")String userid);

    @Insert("insert into [yonghu](userid,username,password,image,type,tel,email,company,addr) values(#{userid},#{username},#{password},#{image},#{type},#{tel},#{email},#{company},#{addr})")
    void insert(yonghu yonghu);

}
